package com.ridu.project.beshid.entity;

import lombok.*;

import javax.persistence.*;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Entity
@Table(name = "jifen_stream", catalog = "besh_id_edu")
public class JifenStreamEntity extends BaseEntity {

    @Basic
    @Column(name = "jifen",columnDefinition = "varchar(20) COMMENT '积分'")
    private String jifen;

    @Basic
    @Column(name = "total",columnDefinition = "varchar(20) COMMENT '总额'")
    private String total;

    @Basic
    @Column(name = "description",columnDefinition = "varchar(255) COMMENT '详情'")
    private String description;

    @ManyToOne
    @JoinColumn(name = "admin_id")
    private UserEntity user;

    @ManyToOne
    @JoinColumn(name = "user_id")
    private BeshUserEntity owner;

    @Basic
    @Column(name = "transaction_hash",columnDefinition = "varchar(50) COMMENT '哈希'")
    private String transactionHash;
}
